`ifndef JZ4785_FXU_XCG_VH_FILE
`define JZ4785_FXU_XCG_VH_FILE

//============================================================
`define JZ4785_UXCG_G         3    //group  width
`define JZ4785_UXCG_M         5    //member width
`define JZ4785_UXCG           8    //ucode  width

//============================================================
// instruction group MOV
//============================================================
`define JZ4785_UXCG_G_MOV       3'b001 

//MOVN.PS,MOVN.D  > MOVN_DP
//MOVZ.PS,MOVZ.D  > MOVZ_DP

//------------------------------
`define JZ4785_UXCG_M_ALNV_PS   5'b00_000 
`define JZ4785_UXCG_M_MOVF      5'b00_010
`define JZ4785_UXCG_M_MOVT      5'b00_011

`define JZ4785_UXCG_M_MOVN_S    5'b00_100 
`define JZ4785_UXCG_M_MOVN_DP   5'b00_101 
`define JZ4785_UXCG_M_MOVZ_S    5'b00_110 
`define JZ4785_UXCG_M_MOVZ_DP   5'b00_111 


//------------------------------
`define JZ4785_UXCG_M_MOVF_S    5'b01_000
`define JZ4785_UXCG_M_MOVF_D    5'b01_001
`define JZ4785_UXCG_M_MOVF_PS   5'b01_010
`define JZ4785_UXCG_M_MOVT_S    5'b01_100
`define JZ4785_UXCG_M_MOVT_D    5'b01_101
`define JZ4785_UXCG_M_MOVT_PS   5'b01_110

//------------------------------
`define JZ4785_UXCG_M_MTC1      5'b10_000
`define JZ4785_UXCG_M_MTHC1     5'b10_001
`define JZ4785_UXCG_M_MFC1      5'b10_010
`define JZ4785_UXCG_M_MFHC1     5'b10_011

`define JZ4785_UXCG_M_MVFG_B    5'b10_100
`define JZ4785_UXCG_M_MVFG_H    5'b10_101
`define JZ4785_UXCG_M_MVFG_W    5'b10_110
`define JZ4785_UXCG_M_MOVER_D   5'b10_111
//------------------------------
                          
//LWC1,LWXC1        >LW
//LDC1,LDXC1,LUXC1  >LD
//LD_V,LDX_V        >LV

//SUXC1,SDXC1       >SDXC1
//STXV,STV          >STV

`define JZ4785_UXCG_M_LW        5'b11_000
`define JZ4785_UXCG_M_LD        5'b11_001
`define JZ4785_UXCG_M_LV        5'b11_010

`define JZ4785_UXCG_M_STV       5'b11_011
`define JZ4785_UXCG_M_SWC1      5'b11_100
`define JZ4785_UXCG_M_SWXC1     5'b11_101
`define JZ4785_UXCG_M_SDC1      5'b11_110
`define JZ4785_UXCG_M_SDXC1     5'b11_111

//------------------------------------------------------------

`define JZ4785_UXCG_ALNV_PS   {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_ALNV_PS} 
`define JZ4785_UXCG_MOVF      {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVF   }
`define JZ4785_UXCG_MOVT      {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVT   }

`define JZ4785_UXCG_MOVN_S    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVN_S } 
`define JZ4785_UXCG_MOVN_DP   {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVN_DP} 
`define JZ4785_UXCG_MOVZ_S    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVZ_S } 
`define JZ4785_UXCG_MOVZ_DP   {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVZ_DP} 
`define JZ4785_UXCG_MOVF_S    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVF_S }
`define JZ4785_UXCG_MOVF_D    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVF_D }
`define JZ4785_UXCG_MOVF_PS   {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVF_PS}
`define JZ4785_UXCG_MOVT_S    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVT_S }
`define JZ4785_UXCG_MOVT_D    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVT_D }
`define JZ4785_UXCG_MOVT_PS   {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVT_PS}
`define JZ4785_UXCG_MTC1      {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MTC1   }
`define JZ4785_UXCG_MTHC1     {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MTHC1  }
`define JZ4785_UXCG_MFC1      {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MFC1   }
`define JZ4785_UXCG_MFHC1     {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MFHC1  }
`define JZ4785_UXCG_MVFG_B    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MVFG_B }
`define JZ4785_UXCG_MVFG_H    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MVFG_H }
`define JZ4785_UXCG_MVFG_W    {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MVFG_W }
`define JZ4785_UXCG_MOVER_D   {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_MOVER_D}
`define JZ4785_UXCG_LW        {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_LW     }
`define JZ4785_UXCG_LD        {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_LD     }
`define JZ4785_UXCG_LV        {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_LV     }
`define JZ4785_UXCG_STV       {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_STV    }
`define JZ4785_UXCG_SWC1      {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_SWC1   }
`define JZ4785_UXCG_SWXC1     {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_SWXC1  }
`define JZ4785_UXCG_SDC1      {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_SDC1   }
`define JZ4785_UXCG_SDXC1     {`JZ4785_UXCG_G_MOV , `JZ4785_UXCG_M_SDXC1  }


//============================================================
// instruction group MVTG
//============================================================
`define JZ4785_UXCG_G_MVTG        3'b010

//------------------------------
`define JZ4785_UXCG_M_MVTGR_U_B    5'b00_000
`define JZ4785_UXCG_M_MVTGR_U_H    5'b00_001
`define JZ4785_UXCG_M_MVTGR_U_W    5'b00_010
`define JZ4785_UXCG_M_MVTGR_S_B    5'b00_100
`define JZ4785_UXCG_M_MVTGR_S_H    5'b00_101
`define JZ4785_UXCG_M_MVTGR_S_W    5'b00_110
//------------------------------
`define JZ4785_UXCG_M_MVTG_U_B     5'b01_000
`define JZ4785_UXCG_M_MVTG_U_H     5'b01_001
`define JZ4785_UXCG_M_MVTG_U_W     5'b01_010
`define JZ4785_UXCG_M_MVTG_S_B     5'b01_100
`define JZ4785_UXCG_M_MVTG_S_H     5'b01_101
`define JZ4785_UXCG_M_MVTG_S_W     5'b01_110
//------------------------------
`define JZ4785_UXCG_M_MOVER_B      5'b10_x00
`define JZ4785_UXCG_M_MOVER_H      5'b10_x01
`define JZ4785_UXCG_M_MOVER_W      5'b10_x10
//------------------------------------------------------------
`define JZ4785_UXCG_MVTGR_U_B    { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTGR_U_B }
`define JZ4785_UXCG_MVTGR_U_H    { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTGR_U_H }
`define JZ4785_UXCG_MVTGR_U_W    { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTGR_U_W }
`define JZ4785_UXCG_MVTGR_S_B    { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTGR_S_B }
`define JZ4785_UXCG_MVTGR_S_H    { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTGR_S_H }
`define JZ4785_UXCG_MVTGR_S_W    { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTGR_S_W }
`define JZ4785_UXCG_MVTG_U_B     { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTG_U_B  }
`define JZ4785_UXCG_MVTG_U_H     { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTG_U_H  }
`define JZ4785_UXCG_MVTG_U_W     { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTG_U_W  }
`define JZ4785_UXCG_MVTG_S_B     { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTG_S_B  }
`define JZ4785_UXCG_MVTG_S_H     { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTG_S_H  }
`define JZ4785_UXCG_MVTG_S_W     { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MVTG_S_W  }
`define JZ4785_UXCG_MOVER_B      { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MOVER_B   }
`define JZ4785_UXCG_MOVER_H      { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MOVER_H   }
`define JZ4785_UXCG_MOVER_W      { `JZ4785_UXCG_G_MVTG,`JZ4785_UXCG_M_MOVER_W   }
//============================================================
// instruction group MVFGE
//============================================================
`define JZ4785_UXCG_G_MVFGE      3'b011

`define JZ4785_UXCG_M_MVFGE_B    5'bxx_000
`define JZ4785_UXCG_M_MVFGE_H    5'bxx_001
`define JZ4785_UXCG_M_MVFGE_W    5'bxx_010

`define JZ4785_UXCG_M_MVFGER_B   5'bxx_100
`define JZ4785_UXCG_M_MVFGER_H   5'bxx_101
`define JZ4785_UXCG_M_MVFGER_W   5'bxx_110

//------------------------------------------------------------
`define JZ4785_UXCG_MVFGE_B     {`JZ4785_UXCG_G_MVFGE, `JZ4785_UXCG_M_MVFGE_B  }
`define JZ4785_UXCG_MVFGE_H     {`JZ4785_UXCG_G_MVFGE, `JZ4785_UXCG_M_MVFGE_H  }
`define JZ4785_UXCG_MVFGE_W     {`JZ4785_UXCG_G_MVFGE, `JZ4785_UXCG_M_MVFGE_W  }
`define JZ4785_UXCG_MVFGER_B    {`JZ4785_UXCG_G_MVFGE, `JZ4785_UXCG_M_MVFGER_B }
`define JZ4785_UXCG_MVFGER_H    {`JZ4785_UXCG_G_MVFGE, `JZ4785_UXCG_M_MVFGER_H }
`define JZ4785_UXCG_MVFGER_W    {`JZ4785_UXCG_G_MVFGE, `JZ4785_UXCG_M_MVFGER_W }
//============================================================
// instruction group SLDR
//============================================================
`define JZ4785_UXCG_G_SLDR       3'b100

`define JZ4785_UXCG_M_SLDR_B     5'bxx_000
`define JZ4785_UXCG_M_SLDR_H     5'bxx_001
`define JZ4785_UXCG_M_SLDR_W     5'bxx_010
`define JZ4785_UXCG_M_SLDR_D     5'bxx_011

`define JZ4785_UXCG_M_SLD_B      5'bxx_100
`define JZ4785_UXCG_M_SLD_H      5'bxx_101
`define JZ4785_UXCG_M_SLD_W      5'bxx_110
`define JZ4785_UXCG_M_SLD_D      5'bxx_111

`define JZ4785_UXCG_SLDR_B     {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLDR_B}
`define JZ4785_UXCG_SLDR_H     {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLDR_H}
`define JZ4785_UXCG_SLDR_W     {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLDR_W}
`define JZ4785_UXCG_SLDR_D     {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLDR_D}

`define JZ4785_UXCG_SLD_B      {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLD_B}
`define JZ4785_UXCG_SLD_H      {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLD_H}
`define JZ4785_UXCG_SLD_W      {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLD_W}
`define JZ4785_UXCG_SLD_D      {`JZ4785_UXCG_G_SLDR,`JZ4785_UXCG_M_SLD_D}

//============================================================
// instruction group COND
//============================================================
`define JZ4785_UXCG_G_COND       3'b101
`define JZ4785_UXCG_M_COND_S     5'bxx_x00
`define JZ4785_UXCG_M_COND_D     5'bxx_x01
`define JZ4785_UXCG_M_COND_P     5'bxx_x10

`define JZ4785_UXCG_COND_S     {`JZ4785_UXCG_G_COND,`JZ4785_UXCG_M_COND_S}
`define JZ4785_UXCG_COND_D     {`JZ4785_UXCG_G_COND,`JZ4785_UXCG_M_COND_D}
`define JZ4785_UXCG_COND_P     {`JZ4785_UXCG_G_COND,`JZ4785_UXCG_M_COND_P}

//============================================================
// instruction group Branch
//============================================================
//BC1T,BC1TL >BC1T
//BC1F,BC1FL >BC1F

`define JZ4785_UXCG_G_BRANCH    3'b110

`define JZ4785_UXCG_M_BC1T      5'b00_xx0
`define JZ4785_UXCG_M_BC1F      5'b00_xx1

`define JZ4785_UXCG_M_BZ_B      5'b01_000
`define JZ4785_UXCG_M_BZ_H      5'b01_001
`define JZ4785_UXCG_M_BZ_W      5'b01_010
`define JZ4785_UXCG_M_BZ_D      5'b01_011
`define JZ4785_UXCG_M_BZ_V      5'b01_100

`define JZ4785_UXCG_M_BNZ_B     5'b10_000
`define JZ4785_UXCG_M_BNZ_H     5'b10_001
`define JZ4785_UXCG_M_BNZ_W     5'b10_010
`define JZ4785_UXCG_M_BNZ_D     5'b10_011
`define JZ4785_UXCG_M_BNZ_V     5'b10_100
//------------------------------------------------------------
`define JZ4785_UXCG_BC1T     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BC1T  }
`define JZ4785_UXCG_BC1F     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BC1F  }
`define JZ4785_UXCG_BZ_B     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BZ_B  }
`define JZ4785_UXCG_BZ_H     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BZ_H  }
`define JZ4785_UXCG_BZ_W     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BZ_W  }
`define JZ4785_UXCG_BZ_D     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BZ_D  }
`define JZ4785_UXCG_BZ_V     {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BZ_V  }
`define JZ4785_UXCG_BNZ_B    {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BNZ_B }
`define JZ4785_UXCG_BNZ_H    {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BNZ_H }
`define JZ4785_UXCG_BNZ_W    {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BNZ_W }
`define JZ4785_UXCG_BNZ_D    {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BNZ_D }
`define JZ4785_UXCG_BNZ_V    {`JZ4785_UXCG_G_BRANCH,`JZ4785_UXCG_M_BNZ_V }
//============================================================
// instruction group spec
//============================================================
`define JZ4785_UXCG_G_SPEC      3'b111

`define JZ4785_UXCG_M_CTC1      5'bxx_100
`define JZ4785_UXCG_M_CFC1      5'bxx_101

`define JZ4785_UXCG_M_CTCMSA    5'bxx_110
`define JZ4785_UXCG_M_CFCMSA    5'bxx_111

`define JZ4785_UXCG_M_IU_JMP    5'b00_000
`define JZ4785_UXCG_M_TRAP      5'b00_001

`define JZ4785_UXCG_CTC1     { `JZ4785_UXCG_G_SPEC,`JZ4785_UXCG_M_CTC1   }
`define JZ4785_UXCG_CFC1     { `JZ4785_UXCG_G_SPEC,`JZ4785_UXCG_M_CFC1   }

`define JZ4785_UXCG_CTCMSA   { `JZ4785_UXCG_G_SPEC,`JZ4785_UXCG_M_CTCMSA }
`define JZ4785_UXCG_CFCMSA   { `JZ4785_UXCG_G_SPEC,`JZ4785_UXCG_M_CFCMSA }

`define JZ4785_UXCG_IU_JMP   { `JZ4785_UXCG_G_SPEC,`JZ4785_UXCG_M_IU_JMP }
`define JZ4785_UXCG_TRAP     { `JZ4785_UXCG_G_SPEC,`JZ4785_UXCG_M_TRAP   }

`endif
